//
//  LSZSpiritualityManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2017/9/28.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LSZSpiritualityManager.h"

@implementation LSZSpiritualityManager
-(id)initWithSpiritualityManager:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        NSMutableArray * arrayMut = [NSMutableArray array];
        self.mutDataArray = [NSMutableArray array];
        self.historyArrayData = [[NSMutableArray alloc]init];

        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayData = dic[@"data"];
        for (NSDictionary * diction in arrayData) {
            LSZSpiritualityMg *  SpiritualityMg = [[LSZSpiritualityMg alloc]init];
            SpiritualityMg.addtime = [NSString stringWithFormat:@"%@",diction[@"addtime"]];
            SpiritualityMg.album = [NSString stringWithFormat:@"%@",diction[@"album"]];
            SpiritualityMg.content = [NSString stringWithFormat:@"%@",diction[@"content"]];
            SpiritualityMg.duration =  [LSZSpecialPackaging TimeStamp:  [NSString stringWithFormat:@"%@",diction[@"duration"]]];
            SpiritualityMg.fileUrl = [NSString stringWithFormat:@"%@",diction[@"fileUrl"]];
            SpiritualityMg.id_id = [NSString stringWithFormat:@"%@",diction[@"id"]];
            SpiritualityMg.image = [NSString stringWithFormat:@"%@",diction[@"image"]];
            SpiritualityMg.image300 = [NSString stringWithFormat:@"%@",diction[@"image300"]];
            SpiritualityMg.parentId = [NSString stringWithFormat:@"%@",diction[@"parentId"]];
            SpiritualityMg.singerName = [NSString stringWithFormat:@"%@",diction[@"singerName"]];
            SpiritualityMg.title = [NSString stringWithFormat:@"%@",diction[@"title"]];
            [arrayMut addObject:SpiritualityMg];
        }
        self.mutDataArray = arrayMut;
        [self.historyArrayData setArray:arrayData];

    }
    return self;
}
@end

@implementation LSZSpiritualityMg
@end
